import React from 'react';
import { useHistory } from 'react-router-dom';
import { Result, Button } from 'antd';

export default function Error404(props) {
  const history = useHistory();
  console.log(history);
  return (
    <Result
      status='404'
      title='404'
      subTitle='Sorry, the page you visited does not exist.'
      extra={
        <Button
          type='primary'
          onClick={() => {
            history.push('/index');
          }}
        >
          Back Home
        </Button>
      }
    />
  );
}
